package com.dmjj.common.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 王丽凯
 * @Description: TODO
 * @Title: ResultVO
 * @ProjectName dmjj-parent
 * @date 2018/12/24
 */
@Data
@EqualsAndHashCode(callSuper=false)
@ApiModel("返回结果VO")
public class ResultVO<T> {

    @ApiModelProperty("返回码")
    private Integer code;
    @ApiModelProperty("返回信息")
    private String msg;
    @ApiModelProperty("返回的对象")
    private T data;

    public ResultVO(Integer code, String msg, T t){
                this.code=code;
                this.msg = msg;
                if (t!=null){
                    this.data = t;
                }
    }
}
